const formatBody = (item) => {
	return JSON.parse(item.body).title
}
const formatType = (item) => {
	let type = item.type
	switch(type) {
		case 1:
		 	return "单选题";
		 	break;
		case 2:
		 	return "多选题";
		 	break;	
		case 3:
			 return "判断题";
			break;
		case 4:
			return "问答题";
			break; 
	}
}
const formatCate = (item) => {
	return item.categoryInfo.join("、")
}
// const formatUpdated = (dataObj) => {
// 	return new Date(dataObj.updated).format("yyyy-MM-dd hh:mm:ss")
// }
export const questionOpts = [{
	th:'题目',
	// width: "200",
	field: 'body',
	format: formatBody
},{
	th:'类型',
	field: 'type',
	format: formatType,
	width: "80"
},{
	th:'分类',
	field: 'categoryInfo',
	width: "200",
	format: formatCate,
	width: "250"
},{
	th:'创建日期',
	field: "created",
	width: "180"
	// format: formatUpdated
}]